#ifndef LONGKEY_PCAGENT_STRING_FORMAT_H_
#define LONGKEY_PCAGENT_STRING_FORMAT_H_

#include <Windows.h>
#include <atlstr.h>
#include "../base/basictypes.h"

class StringFormatter
{
public:
	explicit StringFormatter(const CString& language);
	~StringFormatter();

	// Loads string from the language resource DLL.
	HRESULT LoadString(int32 resource_id, CString* result);

	// Loads string for format_id from the language resource DLL and then use
	// that as the format string to create the result string.
	HRESULT FormatMessage(CString* result, int32 format_id, ...);

private:
	CString language_;

	DISALLOW_EVIL_CONSTRUCTORS(StringFormatter);
};

#endif	// LONGKEY_PCAGENT_STRING_FORMAT_H_